Appearance
KBE3D / KBSatellite / _tlejs
_tlejs
tle.js - 第三方导出
函数
| 函数 | 描述 |
|---|---|
| clearCache | Clears SGP caches to free up memory for long-running apps. |
| getCacheSizes | Returns the current sizes of SGP caches. |
| getGroundTracks | (Async) Calculates three orbit tracks for a TLE (previous, current, and next orbits). |
| getGroundTracksSync | (Sync) Calculates three orbit tracks for a TLE (previous, current, and next orbits). |
| getLastAntemeridianCrossingTimeMS | Determines the last time the satellite crossed the antemeridian. Returns -1 if not found (e.g. for geosynchronous satellites). |
| getLatLngObj | Determines satellite position for the given time. |
| getLngLatAtEpoch | Determines the satellite's position at the time of the TLE epoch (when the TLE was generated). |
| getOrbitTrack | (Async) Generates an array of lng/lat pairs representing a ground track (orbit track), starting from startTimeMS and continuing until just before crossing the antemeridian, which is considered the end of the orbit for convenience. |
| getOrbitTrackSync | (Sync) Generates an array of lng/lat pairs representing a ground track (orbit track), starting from startTimeMS and continuing until just before crossing the antemeridian, which is considered the end of the orbit for convenience. |
| getSatBearing | (Experimental) Determines the compass bearing from the perspective of the satellite. Useful for 3D / pitched map perspectives. |
| getSatelliteInfo | Determines satellite position and look angles from an earth observer. Note that observer input arguments are only needed if you are interested in observer-relative outputs (azimuth, elevation, and range). |
| getVisibleSatellites | Determines which satellites are currently visible, assuming a completely flat horizon. |
| getBstarDrag | BSTAR drag term. This estimates the effects of atmospheric drag on the satellite's motion. See https://en.wikipedia.org/wiki/BSTAR, https://celestrak.com/columns/v04n03, and http://www.castor2.ca/03_Mechanics/03_TLE/B_Star.html |
| getCatalogNumber | Returns the Space Catalog Number (aka NORAD Catalog Number). See https://en.wikipedia.org/wiki/Satellite_Catalog_Number Output range: 0 to 99999 |
| getCatalogNumber1 | Returns the Space Catalog Number (aka NORAD Catalog Number) from the first line of the TLE. See https://en.wikipedia.org/wiki/Satellite_Catalog_Number Output range: 0 to 99999 |
| getChecksum1 | TLE line 1 checksum (modulo 10), for verifying the integrity of this line of the TLE. Note that letters, blanks, periods, and plus signs are counted as 0, while minus signs are counted as 1. Output range: 0 to 9 |
| getClassification | Returns the satellite classification. |
| getEpochDay | Returns the TLE epoch day of the year (day of year with fractional portion of the day) when the TLE was generated. For example, a TLE generated on January 1 will return something like 1.18396726. Output range: 1 to 365.99999999 |
| getEpochYear | Returns the TLE epoch year (last two digits) when the TLE was generated. For example, a TLE generated in 2022 will return 22. Output range: 00 to 99. |
| getFirstTimeDerivative | First Time Derivative of the Mean Motion divided by two, measured in orbits per day per day (orbits/day ^ 2). Defines how mean motion changes from day to day, so TLE propagators can still be used to make reasonable guesses when distant from the original TLE epoch. Can be a negative or positive number. Aka mean motion dot. See https://en.wikipedia.org/wiki/Mean_Motion |
| getIntDesignatorLaunchNumber | Returns the launch number of the year, which makes up part of the COSPAR id (international designator). For example, the 50th launch of the year will return 50. See https://en.wikipedia.org/wiki/International_Designator Output range: 1 to 999 |
| getIntDesignatorPieceOfLaunch | Returns the piece of the launch, which makes up part of the COSPAR id (international designator). For example, "A" represents the primary payload, followed by secondary payloads, rockets involved in the launch, and any subsequent debris. See https://en.wikipedia.org/wiki/International_Designator Output range: A to ZZZ |
| getIntDesignatorYear | Returns the launch year (last two digits), which makes up part of the COSPAR id (international designator). For example, a satellite launched in 1999 will return "99". See https://en.wikipedia.org/wiki/International_Designator Output range: 00 to 99 |
| getLineNumber1 | Returns the line number from line 1. Should always return "1" for valid TLEs. |
| getOrbitModel | Private value - used by Air Force Space Command to reference the orbit model used to generate the TLE (e.g. SGP, SGP4). Distributed TLES will always return 0 for this value. Note that all distributed TLEs are generated with SGP4/SDP4. See https://celestrak.com/columns/v04n03/ Output range: 0 to 9 |
| getSecondTimeDerivative | Second Time Derivative of Mean Motion divided by six, measured in orbits per day per day per day (orbits/day ^ 3). Similar to the first time derivative, it measures rate of change in the Mean Motion Dot so software can make reasonable guesses when distant from the original TLE epoch. Normally zero unless the satellite is manuevering or has a decaying orbit. See https://en.wikipedia.org/wiki/Mean_Motion and http://castor2.ca/03_Mechanics/03_TLE/Mean_Mot_Dot.html Aka mean motion double dot. |
| getTleSetNumber | TLE element set number, incremented for each new TLE generated since launch. 999 seems to mean the TLE has maxed out. Output range: technically 1 to 9999, though in practice the maximum number seems to be 999. |
| getCatalogNumber2 | Returns the Space Catalog Number (aka NORAD Catalog Number) from the second line of the TLE. See https://en.wikipedia.org/wiki/Satellite_Catalog_Number Output range: 0 to 99999 |
| getChecksum2 | TLE line 2 checksum (modulo 10), for verifying the integrity of this line of the TLE. Note that letters, blanks, periods, and plus signs are counted as 0, while minus signs are counted as 1. Output range: 0 to 9 |
| getEccentricity | Returns the orbital eccentricity. All artificial Earth satellites have an eccentricity between 0 (perfect circle) and 1 (parabolic orbit). See https://en.wikipedia.org/wiki/Orbital_eccentricity Output range: 0 to 1 |
| getInclination | Returns the inclination relative to the Earth's equatorial plane in degrees (0 to 180 degrees). 0 to 90 degrees is a prograde orbit and 90 to 180 degrees is a retrograde orbit. See https://en.wikipedia.org/wiki/Orbital_inclination |
| getLineNumber2 | Returns the line number from line 2. Should always return "2" for valid TLEs. |
| getMeanAnomaly | Returns the Mean Anomaly. Indicates where the satellite was located within its orbit at the time of the TLE epoch. See https://en.wikipedia.org/wiki/Mean_Anomaly |
| getMeanMotion | Returns the revolutions around the Earth per day (mean motion). Theoretically can be a value between 0 to 17. See https://en.wikipedia.org/wiki/Mean_Motion |
| getPerigee | Returns the argument of perigee. See https://en.wikipedia.org/wiki/Argument_of_perigee |
| getRevNumberAtEpoch | Returns the total satellite revolutions when this TLE was generated (0 to 99999). This number seems to roll over (e.g. 99999 -> 0). |
| getRightAscension | Returns the right ascension of the ascending node in degrees. Essentially, this is the angle of the satellite as it crosses northward (ascending) across the Earth's equator (equatorial plane). See https://en.wikipedia.org/wiki/Right_ascension_of_the_ascending_node |
| getCOSPAR | Determines COSPAR ID (International Designator). See https://en.wikipedia.org/wiki/International_Designator |
| getSatelliteName | Determines the name of a satellite, if present in the first line of a 3-line TLE. If not found, returns "Unknown" by default (or the COSPAR ID when fallbackToCOSPAR is true). |
| getEpochTimestamp | Determines the timestamp of a TLE epoch (the time a TLE was generated). |
| getAverageOrbitTimeMS | Determines the average amount of milliseconds in one orbit. |
| getAverageOrbitTimeMins | Determines the average amount of minutes in one orbit. |
| getAverageOrbitTimeS | Determines the average amount of seconds in one orbit. |
| parseTLE | Converts string and array TLE formats into a parsed TLE in a consistent object format. Accepts 2 and 3-line (with satellite name) TLE variants in string (\n-delimited) and array variants. |
| isValidTLE | Determines if a TLE is structurally valid. |
| computeChecksum | Determines the checksum for a single line of a TLE. Checksum = modulo 10 of sum of all numbers (including line number) + 1 for each negative sign (-). Everything else is ignored. |
| clearTLEParseCache | Clears the TLE parse cache, which may be useful for long-running app.s |
接口
| 接口 | 描述 |
|---|---|
| GroundTracksInput | Input for getGroundTracks() and getGroundTracksSync(). |
| LngLat | Longitude, latitude pair in Array format. Note that this format is reversed from the more familiar lat/lng format in order to be easily used for GeoJSON, which formats points as [lng, lat]. |
| LatLngObject | Latitude, longitude pair in Object format. |
| ParsedTLE | Output of parseTLE(). TLE normalized into a predictable format for fast lookups. |
| OrbitTrackSyncInput | Input for getOrbitTrackSync(). Note that getOrbitTrack() uses OrbitTrackInput instead. |
| OrbitTrackInput | Input for getOrbitTrack(). Note that getOrbitTrackSync() uses OrbitTrackInputSync instead. |
| SatBearingOutput | Output for getSatBearing(). |
| SatelliteInfoOutput | Output for getSatelliteInfo(). |
| VisibleSatellitesInput | Input for getVisibleSatellites(). |
枚举
| 枚举 | 描述 |
|---|---|
| SatelliteClassification | - |
类型别名
| 类型别名 | 描述 |
|---|---|
| Degrees | Generic degrees. Generally 0 to 360 degrees unless otherwise noted. |
| Meters | - |
| Kilometers | - |
| KilometersPerSecond | - |
| LatitudeDegrees | Latitude in degrees. Range: from -90 to 90. |
| LongitudeDegrees | Longitude in degrees. Range: from -180 to 180. |
| Timestamp | Unix timestamp in milliseconds. |
| Minutes | - |
| Seconds | - |
| Milliseconds | - |
| TLE | TLE in unknown format, to be normalized by parseTLE(). |
| TLELine | - |
| ThreeGroundTracks | Three ground track arrays (last, current, and next orbit). |
| BSTARDragOutput | Output of getBstarDrag() in EarthRadii ^ -1 units. |
| FirstTimeDerivativeOutput | Output of getFirstTimeDerivative() in orbits / day ^ 2 units. |
| SecondTimeDerivativeOutput | Output of getSecondTimeDerivative() in orbits / day ^ 3 units. |
